import request from '@/config/axios'

export interface StoryVO {
                    id: number
                    roleId: number
                    name: string
                    rpg: string
                    heartbeatLevel: number
                    duration: number
                    fileId: number
                    prompt: string
}

// 查询场景列表
export const getStoryPage = async (params) => {
  return await request.get({ url: '/lm/story/page', params })
}

// 查询场景详情
export const getStory = async (id: number) => {
  return await request.get({ url: '/lm/story/get?id=' + id })
}

// 新增场景
export const createStory = async (data: StoryVO) => {
  return await request.post({ url: '/lm/story/create', data })
}

// 修改场景
export const updateStory = async (data: StoryVO) => {
  return await request.put({ url: '/lm/story/update', data })
}

// 删除场景
export const deleteStory = async (id: number) => {
  return await request.delete({ url: '/lm/story/delete?id=' + id })
}

// 导出场景 Excel
export const exportStoryApi = async (params) => {
  return await request.download({ url: '/lm/story/export-excel', params })
}